#ifndef _CCSPINEGLOBAL_H_
#define _CCSPINEGLOBAL_H_

#include "cocos2d.h"
#include <cstdlib>

USING_NS_CC;
using namespace std;

namespace CCSpineGlobal {

class CCStrPredicate : public binary_function<const char*, const char*, bool> {
public:
	bool operator()(const char* str1, const char* str2) const {
		// true means str1 is less than str2
		// false means str1 is not less than str2
		return strcmp(str1, str2) < 0;
	}
};
    
static const char* copy(const char* src) {
    if(src == NULL)
        return NULL;
    size_t len = strlen(src);
    char* dst = (char*)calloc(len + 1, sizeof(char));
    memcpy(dst, src, len);
    return dst;
}
    
}

#endif